import random as r
offices=[[],[],[]]
teachers=['a','b','c','d','e','f','g','h']
for t in teachers:
    offices[r.randint(0,2)].append(t)
print(offices)
for i in range(len(offices)):
    print("办公室{: >3}中有{: >2}位老师，分别为：{}".format((i+1),len(offices[i]),tuple(offices[i])))